﻿// =================================================================== 
// 项目说明
//====================================================================
// 文件： ERP_CustomerReturn.cs
// 创建时间：2016/12/5
// 负责人：
// ===================================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using CRMMis.Model;
using CRMMis.IDAL;


namespace MSSQLDAL
{
    /// <summary>
    /// 数据层实例化接口类  接收客户退货.
    /// </summary>
    public partial class ERP_CustomerReturnDAL : IERP_CustomerReturnDAL
    {
		//此处写查询数据的sql语句，


        //if QueryDataString==""，DAL层的GetList，GetRecordCount等函数将直接存取ERP_CustomerReturn表


        //if QueryDataString!=""，则DAL层的GetList，GetRecordCount等函数将存取该SQL语句，取代表
		//注意：所写sql语句执行结果的字段必须是唯一的

		private const string QueryDataString = @"select *,
(select STOREROOM_NAME from VIEW_STORE where STOREROOM_ID = a.StoreRoomId) StoreRoomName,
(select USER_NAME from SYS_USER where USER_ID = a.InUser) InUserName,
(select CustomerName from ERP_Customer where CustomerId = a.CustomerId ) CustomerName
   from ERP_CustomerReturn a ";
	}
}
